<template>
  <el-card shadow="never">
    <template #header>
      <span>传输列表</span>
    </template>

    <el-table :data="taskList" style="width: 100%">
      <el-table-column prop="name" label="文件名" />
      <el-table-column label="进度">
        <template #default="{ row }">
          <el-progress
            :percentage="row.percent"
            :status="row.uploading ? '' : 'success'"
          />
        </template>
      </el-table-column>
      <el-table-column label="状态">
        <template #default="{ row }">
          {{ row.uploading ? '上传中' : '已完成' }}
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script setup lang="ts">
import { taskList } from '@/stores/UploadTasks'

</script>